import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import AttendanceView from '../views/attendance/AttendanceView.vue'
import AttendanceResult from '../views/attendance/AttendanceResult.vue'
import AttendanceRecord from '../views/attendance/AttendanceRecord.vue'
import QRCodeView from '../views/QRCodeView.vue'
// import {imageProps} from "element-plus";
const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    children: [
      {
        path: '/attendance',
        name: 'attendance',
        component: AttendanceView,
      },
      {
        path: '/result',
        name: 'result',
        component: AttendanceResult,

      },
      {
        path: '/record/:id',
        name: 'record',
        component: AttendanceRecord
      },
      {
        path: '/class',
        name: 'class',
        component: () => import('@/views/ClassManage.vue')  // 你页面的位置
      },
      {
        path: '/qrcode',
        name: 'QRCodeView',
        component: QRCodeView
      }



    ]

  },

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
